<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="Agreement Termination" >
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>

	<t:panelGrid columns="2"
		columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80"
		width="100%">
		 

		<h:outputText></h:outputText>
		<t:message for="prefix" styleClass="error"></t:message>

		<h:panelGroup>
			<h:outputLabel value="Membership No." styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:outputLabel styleClass="standardText" 
				value="#{adminAgreementTerminateBean.member.membershipNo}"></t:outputLabel>
		</h:panelGroup>

	</t:panelGrid>
	<rich:spacer height="20" />

		<rich:dataTable id="data2" var="obj"  
			value="#{adminAgreementTerminateBean.agreements}" rows="10" width="99%"
			rowKeyVar="rowNo">
			<rich:column style="text-align:center;width:5%;" >
				<f:facet name="header">
					<h:selectBooleanCheckbox id="chkAll" onclick="checkAll(this.form,this)" ></h:selectBooleanCheckbox>
				</f:facet>
				<h:selectBooleanCheckbox id="chk" value="#{obj.markAsAction}"></h:selectBooleanCheckbox>
			</rich:column>
			<rich:column style="text-align:center;width:20%;">
				<f:facet name="header">
					<h:outputText value="Agreement No."></h:outputText>
				</f:facet>
				<h:outputLabel value="#{obj.agreetmentNo}">
				</h:outputLabel>
			</rich:column>
			<rich:column style="text-align:center;width:20%;">
				<f:facet name="header">
					<h:outputText value="Member Name"></h:outputText>
				</f:facet>
				<t:outputText styleClass="standardText" value="#{obj.member.name}"></t:outputText>
			</rich:column>
			<rich:column style="text-align:center;width:20%;">
				<f:facet name="header">
					<h:outputText value="Agreement Date">
						<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur" />
					</h:outputText>
				</f:facet>
				<t:outputText styleClass="standardText" value="#{obj.agreetmentDate}"></t:outputText>
			</rich:column>
			<rich:column style="text-align:center;width:20%;">
				<f:facet name="header">
					<h:outputText value="Membership Category"></h:outputText>
				</f:facet>
				<t:outputText styleClass="standardText" value="#{obj.membership.membershipCategory.name}"></t:outputText>
			</rich:column>

		</rich:dataTable>

		<rich:spacer height="30" />

		<rich:datascroller align="left" for="data2" maxPages="20" />

		<h:panelGroup></h:panelGroup>
		<h:panelGroup></h:panelGroup>

		<h:panelGroup></h:panelGroup>

		<t:panelGroup>
			<t:panelGrid columns="2">
				<h:commandButton value="Terminate" styleClass="button"
					action="#{adminAgreementTerminateBean.terminateAction}"></h:commandButton>
				<h:commandButton value="#{messages['back']}" styleClass="button"
					action="#{adminMemberMgmtBean.navListAction}"
					immediate="true"></h:commandButton>
			</t:panelGrid>
		</t:panelGroup>


</rich:panel>

 